To write the source code for a class:
- (IBAction)foo: (id)Sender;
Id
or has the
IBOutlet
keyword prefixed to its declaration.If you're creating the header file in Project Builder, choose File > New in Project. Project Builder automatically creates a header file template for you. You need to add just the actions, outlets, and other member functions and variables.
#import <AppKit/AppKit.h>@interface TAController:NSObject {IBOutlet NSTableView *tableView; /* an outlet */id commentsLabel; /* another outlet */ // ...NSMutableDictionary *countryDict; /* not an outlet */ // ... } /* target/action */ - (void)addRecord:(NSButton *)sender; /* an action */ - (void)convertCelsius:(id)sender; /* another action */ /* Data read and write methods */ - (void)populateFields:(Country *)aRec; /* not an action */ @end